Skip to content

Conversation

l-trotta
Copy link
Contributor

@l-trotta l-trotta commented Mar 3, 2025

Adds new retry functionality to the client, configurable in the Transport options like so:

        RestClient restClient = RestClient
            .builder(new HttpHost(address.getHostString(), address.getPort(), "http"))
            .build();

        // setting transport option
        RestClientOptions options = new RestClientOptions(RequestOptions.DEFAULT, false,
            BackoffPolicy.constantBackoff(50L, 8));

        ElasticsearchTransport transport = new RestClientTransport(
            restClient, new JacksonJsonpMapper(), options);

        ElasticsearchAsyncClient esClient = new ElasticsearchAsyncClient(transport);

Some doubts remaining in the form of TODOs in the code. (they break checkstyle ignore it for now)

Unit tests available in TransportTest.class

@l-trotta l-trotta requested a review from swallez March 3, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant